Code coverage report for src/directives/oblique-features.directive.js

Statements: 100% (7 / 7)      Branches: 100% (0 / 0)      Functions: 100% (5 / 5)      Lines: 100% (7 / 7)      Ignored: none     

All files » src/directives/ » oblique-features.directive.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 231   1   3             3 10   3 1              
(function() {
  'use strict';
  angular.module('oblique-features')
  .directive('ofFeature', [/*'featuresService',*/ function(/*featuresService*/) {
    return {
      restrict: 'EA',
      transclude: true,
      scope: {
        feature: '@'
      },
      controller: ['$scope', 'featuresService', function($scope, featuresService) {
        $scope.checkFeatureEnabled = function(featureName) {
          return featuresService.checkFeatureEnabled(featureName);
        };
        $scope.toggleFeatureEnabled = function(featureName) {
          return featuresService.toggleFeatureEnabled(featureName);
        };
      }],
      template: '<span ng-if="checkFeatureEnabled(feature)" ng-transclude></span>'
    };
  }]);
})();